package controllers

import (
	"lottery/models"
	"time"
)

func (idx *IndexController) checkBlackUser(uid int) (bool, *models.LtUser) {
	info, ok := idx.ServiceUser.Get(uid)
	if ok && info.BlackTime > int(time.Now().Unix()) {
		// 黑名单存在 且 有效
		return false, info
	}
	return true, info
}
